@echo off
setlocal enabledelayedexpansion

call buildDebug.cmd nopause

copy /y etc\* output\ >nul

set runJs=cscript //nologo
REM Looks like JSDB is actually slower...
REM if exist jsdb set runJs=..\jsdb\jsdb
if exist v8cgi set runJs=..\v8cgi\v8cgi -c ..\v8cgi\v8cgi.conf

echo Parsing libraries...
echo.

set tests=testParse
for /R libs %%T in (*.js) do (
	set tests=!tests! "%%T"
)
for /R %%T in (Alkaline*.js) do (
	set tests=!tests! "%%T"
)

cd output
%runJs% run_script.js js_test %tests%
cd ..
echo.

if /I "%1" == "nopause" goto endit

pause

:endit
